package front

import (
	"errors"
	"fmt"
	"hft/Database/admin"
	"hft/Http/Models/dao"
	daoFront "hft/Http/Models/dao/front"
	"hft/Http/Models/request/front"
	"hft/Http/Models/response"
	resFront "hft/Http/Models/response/front"
	utils "hft/Http/Utils"
	"hft/e"
	"hft/global"
	"regexp"
	"strconv"
	"strings"

	"gorm.io/gorm"
)

type LouPan struct{}

func (*LouPan) GetLouPanList(paginate *front.LouPanSearch, city int) (page *utils.Page, err error) {
	var region *admin.Region

	global.OC_DB.First(&region, city)

	var regions []*admin.Region

	var newStr = strings.Split(paginate.Region, ",")

	var ids = make([]int, 0)

	var regionLinks []string

	if len(newStr) != 0 {
		for _, v := range newStr {
			id, _ := strconv.Atoi(v)
			ids = append(ids, id)
		}
		global.OC_DB.Find(&regions, ids)

		for _, v := range regions {
			regionLinks = append(regionLinks, fmt.Sprintf("%v%v,", v.Link, v.ID))
		}
	} else {
		regionLinks = newStr
	}
	var louPan = make([]*admin.LouPan, 0)
	var names = strings.Split(paginate.Feature, ",")
	var roomTypes = utils.GetIns(paginate.Room)
	var property = utils.GetIns(paginate.Property)

	global.OC_DB.Scopes(daoFront.LouPanDao.GetLouPanList(paginate, regionLinks, fmt.Sprintf("%v%v,%%", region.Link, region.ID), names, roomTypes, property, global.OC_DB)).Find(&louPan).Scopes(dao.GetCount(global.OC_DB)).Count(&paginate.Total)
	for _, v := range louPan {
		if v.WebUrl != "" {
			v.WebUrl = global.OC_CONFIG.AliyunOSS.BucketUrl + v.WebUrl
		}
		if v.PhoneCallUrl != "" {
			v.PhoneCallUrl = global.OC_CONFIG.AliyunOSS.BucketUrl + v.PhoneCallUrl
		}
		if v.WhatsAppQrCode != "" {
			v.WhatsAppQrCode = global.OC_CONFIG.AliyunOSS.BucketUrl + v.WhatsAppQrCode
		}
	}
	paginate.Data = louPan

	return &paginate.Page, nil
}

// 楼盘详情
func (*LouPan) GetLouPanInfo(id int, sid int) (louPanInfo *response.LouPanFrontInfo, err error) {

	var region *admin.Region

	err = global.OC_DB.First(&region, sid).Error

	if errors.Is(err, gorm.ErrRecordNotFound) {
		return nil, errors.New(e.NoManagerHere)
	}

	var louPan = &admin.LouPan{}

	err = global.OC_DB.
		Preload("LouPanSwiper", func(db *gorm.DB) *gorm.DB {
			return db.Joins("LEFT JOIN hft_lou_pan_swiper_category on hft_lou_pan_swiper_category.`id` = hft_lou_pan_swiper.`category`").Order("hft_lou_pan_swiper_category.`sort` desc, `hft_lou_pan_swiper`.`sort` desc")
		}).
		Preload("Activities", func(db *gorm.DB) *gorm.DB {
			return db.Where("status = ?", 1)
		}).
		Preload("LouPanArea").Preload("SellLouPanInfo").Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).Preload("RoomType").First(&louPan, id).Error

	if errors.Is(err, gorm.ErrRecordNotFound) {
		return nil, errors.New("无该楼盘信息")
	}

	if match, _ := regexp.MatchString(fmt.Sprintf("^%v%v,", region.Link, region.ID), louPan.RegionLink); !match {
		return nil, errors.New("找不到楼盘信息")
	}

	var swipes = make([]*response.Swipe, 0)

	for _, v := range louPan.LouPanSwiper {
		var swipeItem = &response.Swipe{ID: int(v.ID), GoUrl: v.GoUrl, Category: v.Category, CategoryName: v.CategoryName, Cover: v.Cover, Url: v.Url, CreateTime: v.CreateTime, Title: v.Title}
		swipes = append(swipes, swipeItem)
	}

	var activities = make([]*response.Activity, 0)
	for _, v := range louPan.Activities {
		var ac = &response.Activity{
			ID:               v.ID,
			Title:            v.Title,
			Cont:             v.Cont,
			ActivitySub:      v.ActivitySub,
			Cover:            global.OC_CONFIG.AliyunOSS.BucketUrl + v.Cover,
			Image:            global.OC_CONFIG.AliyunOSS.BucketUrl + v.Image,
			ButtonName:       v.ButtonName,
			ButtonColor:      v.ButtonColor,
			TextColor:        v.TextColor,
			ActivitySubColor: v.ActivitySubColor,
			BackColor:        v.BackColor,
			BorderColor:      v.BorderColor,
			Application:      v.Application + v.InitNum,
			SuccessButton:    v.SuccessButton,
		}
		activities = append(activities, ac)
	}

	var rooms = make([]*response.RoomList, 0)

	var codes []int

	for _, v := range louPan.RoomType {
		codes = append(codes, v.Code)
	}

	global.OC_DB.Model(&admin.Room{}).Where("lou_pan_id = ?", louPan.ID).Preload("RoomSwiper", func(db *gorm.DB) *gorm.DB {
		return db.Table("hft_room_swiper")
	}).Find(&rooms)
	for _, v := range rooms {
		if v.RoomId > 5 {
			v.RoomId = 5
		}
		for _, j := range v.RoomSwiper {
			fmt.Println(j.CategoryName, j.Url)
			if !strings.HasPrefix(j.Url, global.OC_CONFIG.AliyunOSS.BucketUrl) && j.Url != "" {
				fmt.Println(j.Url)
				j.Url = global.OC_CONFIG.AliyunOSS.BucketUrl + j.Url
			}
		}
	}

	var priceLou = make([]*response.Lou, 0)
	var priceLouPan []*admin.LouPan
	global.OC_DB.
		Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
		Preload("Disadvantage").Not("id = ?", louPan.ID).
		Not("status = ?", 5).
		Order(fmt.Sprintf("ABS(reference_price - %v)", louPan.ReferencePrice)).
		Limit(12).
		Find(&priceLouPan)
	for _, v := range priceLouPan {
		var lou = &response.Lou{ID: v.ID, Name: v.Name, Cover: v.Cover, ReferencePrice: v.ReferencePrice, Status: v.Status, BelongName: v.BelongName, MaxArea: v.MaxArea, MinArea: v.MinArea, Tags: v.Tags, Disadvantages: v.Disadvantage}
		priceLou = append(priceLou, lou)
	}

	var areaLou = make([]*response.Lou, 0)
	var areaLouPan []*admin.LouPan
	// global.OC_DB.Raw("SELECT*,st_distance_sphere (point ( longitude, latitude ),point ( ?, ? )) AS juli FROM hft_loupans WHERE `region_link` LIKE ? AND id <> ? ORDER BY juli ASC LIMIT ?", louPan.Longitude, louPan.Latitude, fmt.Sprintf("%v%v,%%", region.Link, region.ID), louPan.ID, 4).Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).Preload("Disadvantage").Scan(&areaLouPan)
	global.OC_DB.
		Select(fmt.Sprintf("*,st_distance_sphere (point ( longitude, latitude ),point ( %v, %v ))	 AS juli", louPan.Longitude, louPan.Latitude)).
		Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
		Preload("Disadvantage").
		Where("region_link LIKE ?", fmt.Sprintf("%v%v,%%", region.Link, region.ID)).
		Not("status = ?", 5).
		Not("id = ?", louPan.ID).
		Order("juli ASC").
		Limit(12).
		Find(&areaLouPan)
	for _, v := range areaLouPan {
		var lou = &response.Lou{ID: v.ID, Name: v.Name, Cover: v.Cover, ReferencePrice: v.ReferencePrice, Status: v.Status, BelongName: v.BelongName, MaxArea: v.MaxArea, MinArea: v.MinArea, Tags: v.Tags, Disadvantages: v.Disadvantage}
		areaLou = append(areaLou, lou)
	}

	var property = make([]*response.Property, 0)
	var propertyLou []*admin.Property
	err = global.OC_DB.Model(&louPan).Association("Properties").Find(&propertyLou)
	fmt.Println(err)
	for _, v := range propertyLou {
		property = append(property, &response.Property{Name: v.Name, ID: v.ID})
	}

	var info = &response.SellInfo{
		OpenTime:    louPan.SellLouPanInfo.OpenTime,
		GetRoomTime: louPan.SellLouPanInfo.GetRoomTime,
		Developer:   louPan.SellLouPanInfo.Developer,
		SellPhone:   global.OC_CONFIG.Phone.Account + "," + louPan.SellLouPanInfo.SellPhone,
		License:     louPan.SellLouPanInfo.License,
	}
	var area = &response.LouArea{
		FloorArea:       louPan.LouPanArea.FloorArea,
		BuildArea:       louPan.LouPanArea.BuildArea,
		BuildNum:        louPan.LouPanArea.BuildNum,
		UserNum:         louPan.LouPanArea.UserNum,
		ParkingSpace:    louPan.LouPanArea.ParkingSpace,
		VolumeRate:      louPan.LouPanArea.VolumeRate,
		GreeningRate:    louPan.LouPanArea.GreeningRate,
		PropertyCost:    louPan.LouPanArea.PropertyCost,
		PropertyCompany: louPan.LouPanArea.PropertyCompany,
	}

	var tags = make([]*response.Tags, 0)
	for _, v := range louPan.Tags {
		tags = append(tags, &response.Tags{Name: v.Name})
	}
	var web_url = ""
	if louPan.WebUrl != "" {
		web_url = global.OC_CONFIG.AliyunOSS.BucketUrl + louPan.WebUrl
	}
	var phone_call_url = ""
	if louPan.PhoneCallUrl != "" {
		phone_call_url = global.OC_CONFIG.AliyunOSS.BucketUrl + louPan.PhoneCallUrl
	}
	var whats_app_qr_code = ""
	if louPan.WhatsAppQrCode != "" {
		whats_app_qr_code = global.OC_CONFIG.AliyunOSS.BucketUrl + louPan.WhatsAppQrCode
	}
	var louFront = &response.LouPanFrontInfo{
		ID:             louPan.ID,
		Name:           louPan.Name,
		Cover:          louPan.Cover,
		BelongName:     louPan.BelongName,
		ReferencePrice: louPan.ReferencePrice,
		Years:          louPan.Years,
		Address:        louPan.Address,
		Furnish:        louPan.Furnish,
		Status:         louPan.Status,
		Longitude:      louPan.Longitude,
		Latitude:       louPan.Latitude,
		SwipeList:      swipes,
		Activities:     activities,
		Property:       property,
		Tags:           tags,
		RoomList:       rooms,
		PriceLou:       priceLou,
		AreaLou:        areaLou,
		SellLouPanInfo: *info,
		AreaInfo:       *area,
		WhatsApp:       louPan.WhatsApp,
		WhatsAppQrCode: whats_app_qr_code,
		PhoneCallUrl:   phone_call_url,
		WebUrl:         web_url,
	}
	return louFront, nil

}

// 单独查询楼盘相册
func (*LouPan) GetSwipeList(louID int) (list []*resFront.Swipe, err error) {
	var swipeList []*admin.LouPanSwiper
	var newSwipeList []*resFront.Swipe
	err = global.OC_DB.Select("hft_lou_pan_swiper.id,hft_lou_pan_swiper.sort,hft_lou_pan_swiper.category,hft_lou_pan_swiper.cover,hft_lou_pan_swiper.category_name,hft_lou_pan_swiper.lou_pan_id,hft_lou_pan_swiper.url,hft_lou_pan_swiper.go_url,hft_lou_pan_swiper.title").Joins("LEFT JOIN hft_lou_pan_swiper_category on hft_lou_pan_swiper.`category` = hft_lou_pan_swiper_category.`id`").Order("hft_lou_pan_swiper_category.`sort` desc, hft_lou_pan_swiper.`sort` desc").Where("hft_lou_pan_swiper.lou_pan_id = ?", louID).Find(&swipeList).Error
	if err != nil {
		return nil, errors.New(e.ErrorInfo)
	}
	for _, v := range swipeList {
		var url string
		if v.Url != "" {
			url = global.OC_CONFIG.AliyunOSS.BucketUrl + v.Url
		}
		newSwipeList = append(newSwipeList, &resFront.Swipe{
			ID:           int(v.ID),
			LouID:        v.LouPanID,
			CategoryID:   v.Category,
			CategoryName: v.CategoryName,
			GoUrl:        v.GoUrl,
			Title:        v.Title,
			Cover:        v.Cover,
			Url:          url,
		})
	}
	return newSwipeList, nil
}

func (*LouPan) GetRoomSwipeList(roomID int) (list []*resFront.RoomSwipe, err error) {
	var swipeList []*admin.RoomSwiper
	var newSwipeList []*resFront.RoomSwipe
	err = global.OC_DB.Select("hft_lou_pan_swiper_category.`sort`,hft_room_swiper.id,hft_room_swiper.`sort`,hft_room_swiper.category,hft_room_swiper.cover,hft_room_swiper.category_name,hft_room_swiper.url,hft_room_swiper.go_url,hft_room_swiper.`room_id`").Joins("LEFT JOIN hft_lou_pan_swiper_category on hft_room_swiper.`category` = hft_lou_pan_swiper_category.`id`").Order("hft_lou_pan_swiper_category.`sort` desc, hft_room_swiper.`sort` desc").Where("hft_room_swiper.room_id = ?", roomID).Find(&swipeList).Error
	if err != nil {
		return nil, errors.New(e.ErrorInfo)
	}
	for _, v := range swipeList {
		var url string
		if v.Url != "" {
			url = global.OC_CONFIG.AliyunOSS.BucketUrl + v.Url
		}
		newSwipeList = append(newSwipeList, &resFront.RoomSwipe{
			ID:           int(v.ID),
			CategoryName: v.CategoryName,
			GoUrl:        v.GoUrl,
			Cover:        v.Cover,
			Url:          url,
			Category:     v.Category,
		})
	}
	return newSwipeList, nil
}

// 搜寻周边的楼盘
func (*LouPan) FindAroundLou(req *front.AroundLou) ([]*resFront.AroundLou, error) {
	var lous []*resFront.AroundSearchLou
	var lou *admin.LouPan
	if err := global.OC_DB.First(&lou, req.LouID).Error; err != nil {
		return nil, errors.New(e.LouPanNotExist)
	}
	global.OC_DB.Select(fmt.Sprintf("cover,id,name,reference_price,longitude,latitude,longitude,latitude,max_area,min_area,status,ST_DISTANCE_SPHERE(POINT(longitude,latitude),POINT(%v,%v)) AS distance_in_meters", lou.Longitude, lou.Latitude)).Where(fmt.Sprintf("ST_DISTANCE_SPHERE(POINT(longitude,latitude),POINT(%v,%v))", lou.Longitude, lou.Latitude)).Not("status = ?", 5).Order("distance_in_meters asc,sort desc").Limit(10).Find(&lous)
	var data = make([]*resFront.AroundLou, 0)
	for _, v := range lous {
		data = append(data, &resFront.AroundLou{
			ID:             v.ID,
			Name:           v.Name,
			ReferencePrice: v.ReferencePrice,
			Status:         v.Status,
			MaxArea:        v.MaxArea,
			MinArea:        v.MinArea,
			Distance:       int(v.DistanceInMeters),
			Cover:          global.OC_CONFIG.AliyunOSS.BucketUrl + v.Cover,
			Center:         fmt.Sprintf("%v,%v", v.Longitude, v.Latitude),
		})
	}
	var ids []int
	for _, v := range data {
		ids = append(ids, int(v.ID))
	}
	var rooms []*admin.Room
	global.OC_DB.Select("id,room_id,lou_pan_id").Where("lou_pan_id in (?)", ids).Order("room_id asc,sort desc").Find(&rooms)
	for _, v := range data {
		for _, j := range rooms {
			if v.ID == uint(j.LouPanID) {
				v.RoomType = append(v.RoomType, j.RoomId)
			}
		}
		v.RoomType = utils.DeduplicateIntSlice(v.RoomType)
	}
	return data, nil
}

func (*LouPan) GetRoomList(paginate *front.RoomSearch) (interface{}, error) {
	var roomList []*admin.Room
	var list = make([]*resFront.RoomList, 0)
	var lou *admin.LouPan
	err := global.OC_DB.Select("id,name").First(&lou, paginate.LouID).Error
	if err != nil {
		return nil, errors.New(e.LouPanNotExist)
	}
	global.OC_DB.Scopes(daoFront.LouPanDao.RoomList(paginate, global.OC_DB)).Find(&roomList).Scopes(dao.GetCount(global.OC_DB)).Count(&paginate.Total)
	for _, v := range roomList {
		list = append(list, &resFront.RoomList{
			Name:           v.Name,
			Cover:          global.OC_CONFIG.AliyunOSS.BucketUrl + v.Cover,
			Area:           v.Area,
			Status:         v.Status,
			ReferencePrice: v.ReferencePrice,
			FirstPay:       v.FirstPay,
			RoomPayType:    v.RoomPayType,
			ForWord:        v.Forward,
			ID:             int(v.ID),
		})
	}
	var data = map[string]interface{}{
		"pageSize": paginate.PageSize,
		"pageNum":  paginate.PageNum,
		"total":    paginate.Total,
		"list":     list,
		"lou_name": lou.Name,
	}
	return data, nil
}

// 获取户型
func (*LouPan) GetRoomInfo(roomID int) (*resFront.RoomInfo, error) {
	var roomInfo *resFront.RoomInfo
	err := global.OC_DB.Model(&admin.Room{}).Scopes(daoFront.LouPanDao.GetRoomInfo(roomID, global.OC_DB)).Scan(&roomInfo).Error
	if err != nil {
		return nil, errors.New(e.RoomNotExist)
	}
	var swipeList []*resFront.RoomSwipe
	err = global.OC_DB.
		Model(&admin.RoomSwiper{}).
		Select("hft_room_swiper.`cover`,hft_room_swiper.`id`,hft_room_swiper.`category`,hft_room_swiper.`category_name`,hft_room_swiper.`lou_pan_id`,hft_room_swiper.`room_name`,hft_room_swiper.`room_id`,hft_room_swiper.`url`,hft_room_swiper.`go_url`,c.`sort`").
		Joins("LEFT JOIN hft_lou_pan_swiper_category as c on hft_room_swiper.`category` = c.id").
		Where("hft_room_swiper.`room_id` = ?", roomID).
		Order("c.`sort` desc, hft_room_swiper.`sort` desc").
		Scan(&swipeList).Error
	if err != nil {
		return nil, errors.New(e.ErrorInfo)
	}
	var roomList []*response.RoomList
	err = global.OC_DB.Model(&admin.Room{}).Where("lou_pan_id = ?", roomInfo.LouPanID).Not("id = ?", roomID).Find(&roomList).Error
	if err != nil {
		return nil, errors.New(e.ErrorInfo)
	}
	for _, v := range swipeList {
		if !strings.HasPrefix(v.Url, global.OC_CONFIG.AliyunOSS.BucketUrl) {
			v.Url = global.OC_CONFIG.AliyunOSS.BucketUrl + v.Url
		}

	}
	roomInfo.SwipeList = swipeList
	roomInfo.RoomList = roomList
	return roomInfo, nil
}

// 单独获取喜欢
func (*LouPan) GetGuess(louID int, sid int) (*resFront.PriceAndArea, error) {

	var region *admin.Region

	err := global.OC_DB.First(&region, sid).Error

	if errors.Is(err, gorm.ErrRecordNotFound) {
		return nil, errors.New(e.NoManagerHere)
	}
	var areaLou = make([]*response.Lou, 0)
	var areaLouPan []*admin.LouPan
	var priceLou = make([]*response.Lou, 0)
	var priceLouPan []*admin.LouPan
	if louID != 0 {
		var louPan *admin.LouPan
		err = global.OC_DB.First(&louPan, louID).Error
		if err != nil {
			return nil, errors.New(e.LouPanNotExist)
		}
		global.OC_DB.
			Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
			Preload("Disadvantage").Not("id = ?", louPan.ID).
			Order(fmt.Sprintf("ABS(reference_price - %v)", louPan.ReferencePrice)).
			Not("status = ?", 5).
			Limit(12).
			Find(&priceLouPan)
		global.OC_DB.
			Select(fmt.Sprintf("*,st_distance_sphere (point ( longitude, latitude ),point ( %v, %v )) AS juli", louPan.Longitude, louPan.Latitude)).
			Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
			Preload("Disadvantage").
			Where("region_link LIKE ?", fmt.Sprintf("%v%v,%%", region.Link, region.ID)).Not("id = ?", louPan.ID).
			Not("status = ?", 5).
			Order("juli ASC").
			Limit(12).
			Find(&areaLouPan)

	} else {
		global.OC_DB.
			Select("*,t.`lou_pan_te_se_name`").
			Joins("LEFT JOIN hft_loupan_tese as t on t.lou_pan_id = hft_loupans.id").
			Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
			Preload("Disadvantage").
			Where("t.`lou_pan_te_se_name` = ?", "热门楼盘").
			Not("status = ?", 5).
			Order("sort desc").
			Limit(12).
			Find(&priceLouPan)
		global.OC_DB.
			Select("*,t.`lou_pan_te_se_name`").
			Joins("LEFT JOIN hft_loupan_tese as t on t.lou_pan_id = hft_loupans.id").
			Preload("Tags", func(db *gorm.DB) *gorm.DB { return db.Select("id,name") }).
			Preload("Disadvantage").
			Where("t.`lou_pan_te_se_name` = ?", "刚需好房").
			Not("status = ?", 5).
			Limit(12).
			Order("sort desc").
			Find(&areaLouPan)
	}
	for _, v := range priceLouPan {
		var lou = &response.Lou{ID: v.ID, Name: v.Name, Cover: v.Cover, ReferencePrice: v.ReferencePrice, Status: v.Status, BelongName: v.BelongName, MaxArea: v.MaxArea, MinArea: v.MinArea, Tags: v.Tags, Disadvantages: v.Disadvantage}
		priceLou = append(priceLou, lou)
	}
	for _, v := range areaLouPan {
		var lou = &response.Lou{ID: v.ID, Name: v.Name, Cover: v.Cover, ReferencePrice: v.ReferencePrice, Status: v.Status, BelongName: v.BelongName, MaxArea: v.MaxArea, MinArea: v.MinArea, Tags: v.Tags, Disadvantages: v.Disadvantage}
		areaLou = append(areaLou, lou)
	}
	var info = &resFront.PriceAndArea{
		PriceLou: priceLou,
		AreaLou:  areaLou,
	}

	return info, nil
}

// 获取预约看房的信息
func (*LouPan) GetReservationInfo(sid int, ip string) {

}

// 获取经纬度
func (*LouPan) GetLngLat(lou_id int) (interface{}, error) {
	var lou *admin.LouPan
	if err := global.OC_DB.Select("id,longitude,latitude,name,address").First(&lou, lou_id).Error; err != nil {
		return nil, errors.New(e.LouPanNotExist)
	}
	var res = map[string]interface{}{
		"name":      lou.Name,
		"id":        lou.ID,
		"longitude": lou.Longitude,
		"latitude":  lou.Latitude,
		"address":   lou.Address,
	}
	return res, nil
}

// 获取400
func (*LouPan) GetPhoneCall(lou_id int) (interface{}, error) {
	var sellLouPanInfo *admin.SellLouPanInfo
	if err := global.OC_DB.Select("sell_phone,lou_pan_id").Where("lou_pan_id = ?", lou_id).First(&sellLouPanInfo).Error; err != nil {
		return nil, errors.New(e.LouPanNotExist)
	}
	var res = map[string]interface{}{
		"phone": global.OC_CONFIG.Phone.Account + "," + sellLouPanInfo.SellPhone,
	}
	return res, nil
}

// 获取港澳和whatsapp
func (*LouPan) GetGangAo(lou_id int) (interface{}, error) {
	var lou *admin.LouPan
	if err := global.OC_DB.Select("id,whats_app,whats_word").Where("id = ?", lou_id).First(&lou).Error; err != nil {
		return nil, errors.New(e.LouPanNotExist)
	} else {
		return map[string]interface{}{
			"whats_app":  lou.WhatsApp,
			"whats_word": lou.WhatsWord,
		}, nil
	}
}

// 获取该楼盘动态列表信息
var LouPanService = new(LouPan)
